<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Event</title>
</head>

<body>
    <input id="btn" type="button" name="btn" value="提交">
    <!-- 使用js语言绑定事件触发时的函数 -->
    <script>
        var oBtn = document.getElementById('btn');
        oBtn.onclick = function() {
            alert('click');
        }
    </script>
</body>

</html>